package com.kaishengit.service;

import com.kaishengit.dao.EmployeeDao;
import com.kaishengit.entity.Employee;
import com.kaishengit.util.StringUtil;

public class EmployeeService {

	private EmployeeDao dao = new EmployeeDao();
	
	public Employee login(String name,String password) {
		Employee em = dao.findByName(name);
		
		if(em != null && em.getPassword().equals(StringUtil.sha1(password))) {
			return em;
		}
		return null;
	}
}
